package com.yunpeng.dishes.dao.mapper.relation;

import com.yunpeng.dishes.dao.mapper.IRelationMapper;
import com.yunpeng.dishes.dao.model.relation.OrderDishesNutrientsDO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * IOrderDishesNutrientsMapper
 *
 * @author : Moore(hemw)
 * @date : 2020-03-26
 */
@Mapper
public interface IOrderDishesNutrientsMapper extends IRelationMapper<OrderDishesNutrientsDO> {

    /**
     * 根据订单id获取对应最新快照
     *
     * @param orderId
     * @return
     */
    OrderDishesNutrientsDO getByOrderId(Long orderId);

    /**
     * 查询用户最近三十天内数据
     *
     * @param userId
     * @return
     */
    List<OrderDishesNutrientsDO> queryLast30DaysListUser(Long userId);
}
